﻿
Partial Class Hosteria_VS_Habitacion
    Inherits System.Web.UI.Page

    Private Property dbResult As Integer

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
        sdaHabitacionV.InsertParameters("Numero").DefaultValue = Convert.ToInt16(txtNumero.Text)
        sdaHabitacionV.InsertParameters("Categoria").DefaultValue = ddlCategoria.SelectedValue.ToString()
        sdaHabitacionV.InsertParameters("Estado").DefaultValue = ddlEstado.SelectedValue().ToString()
        dbResult = sdaHabitacionV.Insert()
        If dbResult = 1 Then
            txtNumero.Text = ""
        Else
            MsgBox("No se pudo agregar.", MsgBoxStyle.Exclamation, "Error de sistema")
        End If

    End Sub
End Class
